package com.jiangsong.batch.utils;

import com.jiangsong.batch.abst.StepSyncManager;
import org.springframework.batch.core.scope.context.StepContext;

import java.util.Map;

public class JobParameterUtil {

    public static Map<String, Object> getJobParameterMap() {
        StepContext context = StepSyncManager.getContext();
        return context.getJobParameters();
    }

    public static Object getJobParameter(String key) {
        StepContext context = StepSyncManager.getContext();
        return context.getJobParameters().get(key);
    }
}
